using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Legend.Fakes.Configuration;
using Legend.Fakes.Api;
using System.Reflection;
using System.Diagnostics;

namespace Legend.Fakes.VisualBasic
{
    internal class RecordedCallRule
                : BuildableCallRule
    {
        public MethodInfo ApplicableToMethod { get; set; }
        public Func<ArgumentList, bool> IsApplicableToArguments { get; set; }


        protected override bool OnIsApplicableTo(IFakeObjectCall call)
        {
            Debug.WriteLine(this.IsApplicableToArguments(call.Arguments).ToString());


            return call.Method.Equals(this.ApplicableToMethod)
                && this.IsApplicableToArguments(call.Arguments);
        }

        public override void IgnoreArguments()
        {
            throw new NotImplementedException();
        }
    }
}
